package cn.com.twoke.application.game.mario.game.config;

import cn.com.twoke.application.game.mario.game.component.SceneComponent;

public class Settings {
    
    private static final GameConfig config = GameConfig.getInstance();

    public static float scale() {
        if (SceneComponent.isDebug()) {
            return 1.0f;
        } else {
            return 2.0f;
        }
    }

    public static int width() {
        if (SceneComponent.isDebug()) {
            return Tiles.widthOf(config.getDebugSceneWidth());
        } else {
            return Tiles.widthOf(config.getSceneWidth()) + Tiles.scaleOf(3);
        }
    }

    public static int height() {
        if (SceneComponent.isDebug()) {
            return Tiles.heightOf(config.getDebugSceneHeight()) + 30 + Tiles.scaleOf(3);
        } else {
            return Tiles.heightOf(config.getSceneHeight()) + 30 + Tiles.scaleOf(3);
        }
    }

    public static int jumpForce() {
        if (SceneComponent.isDebug()) {
            return Tiles.scaleOf(5f);
        } else {
            return Tiles.scaleOf(config.getPlayerJumpForce());
        }
    }
    
    public static float unscaledJumpForce() {
        return config.getPlayerJumpForce();
    }

}
